package com.warframe.entity.database;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "WarframeMarket", schema = "main", catalog = "")
public class WarframeMarketEO {
    private String id;
    private String itemNameEn;
    private String itemNameCn;
    private String urlName;
    private Integer ducats;
    private String drops;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "item_name_en")
    public String getItemNameEn() {
        return itemNameEn;
    }

    public void setItemNameEn(String itemNameEn) {
        this.itemNameEn = itemNameEn;
    }

    @Basic
    @Column(name = "item_name_cn")
    public String getItemNameCn() {
        return itemNameCn;
    }

    public void setItemNameCn(String itemNameCn) {
        this.itemNameCn = itemNameCn;
    }

    @Basic
    @Column(name = "url_name")
    public String getUrlName() {
        return urlName;
    }

    public void setUrlName(String urlName) {
        this.urlName = urlName;
    }

    @Basic
    @Column(name = "ducats")
    public Integer getDucats() {
        return ducats;
    }

    public void setDucats(Integer ducats) {
        this.ducats = ducats;
    }

    @Basic
    @Column(name = "drops")
    public String getDrops() {
        return drops;
    }

    public void setDrops(String drops) {
        this.drops = drops;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WarframeMarketEO that = (WarframeMarketEO) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(itemNameEn, that.itemNameEn) &&
                Objects.equals(itemNameCn, that.itemNameCn) &&
                Objects.equals(urlName, that.urlName) &&
                Objects.equals(ducats, that.ducats) &&
                Objects.equals(drops, that.drops);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, itemNameEn, itemNameCn, urlName, ducats, drops);
    }
}
